package br.com.example.labtimescoreboard;

import java.io.File;

import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.text.Html;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MenuItem.OnMenuItemClickListener;


public class Inicial extends Activity {

   


	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.inicial);
    }

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        getMenuInflater().inflate(R.menu.inicial, menu);
        // Locate MenuItem with ShareActionProvider
       MenuItem item = menu.findItem(R.id.item1);
       
     

       
       
      
     /*
        
        //Fetch and store ShareActionProvider
        mShareActionProvider = (ActionProvider) item.getActionProvider();
        
        mShareActionProvider.setShareIntent(shareIntent);*/

        // Return true to display menu
        return true;
    }
    
    @Override
    public boolean onMenuItemSelected(int featureId, MenuItem item) {
    	// TODO Auto-generated method stub
    	
    	switch (item.getItemId()) {
    	
		case R.id.item1:

		       Intent sendIntent = new Intent();
		       sendIntent.setAction(Intent.ACTION_SEND);
		       sendIntent.putExtra(Intent.EXTRA_TEXT, "Texto");
		       sendIntent.putExtra(Intent.EXTRA_SUBJECT, "titulo texto");
		       sendIntent.setType("text/plain");
		     
		       startActivity(Intent.createChooser(sendIntent, "Enviar para."));
		       
			break;

		default:
			break;
		}
    	
    	return super.onMenuItemSelected(featureId, item);
    	
    	
    	
    }

}


